interface ApiResponse<T = unknown> {
  code: number
  data: T
  msg: string
}

export interface Responses {
  getClassesByCurrentUser: ApiResponse<{
    id: number
    className: string
    classCode: string
    memberCount: number
    role: 'teacher' | 'student'
    isActive: boolean
    isLocked: boolean
    createTime: number
    creatorId: number
    creatorName: string
    description: string
  }[]>
  getClassInfoByClassId: ApiResponse<{
    id: number
    className: string
    classCode: string
    creatorId: number
    creatorName: string
    description: string
    memberCount: number
    isLocked: boolean
    createTime: string
  }>
  createClass: ApiResponse<number>
  joinClass: ApiResponse<number>
  getPunchRecordsByClassId: ApiResponse<{
    id: number
    punchDate: [year: number, month: number, day: number]
    commentText: string
    bookCount: number
    dayCount: number
    isPublic: boolean
    books: unknown[]
    userInfo: {
      userId: number
      username: string
      nickname: string
      avatar: string
    }
    isFollowed: boolean
    createTime: string
    updateTime: string
  }[]>
  getMembersByClassId: ApiResponse<{
    userId: number
    nickname: string
    avatar: string
    role: string
    joinTime: string
    readingDays: number
    readingBooks: number
    todayPunched: boolean
  }[]>
  deleteClassByClassId: ApiResponse<string>
  modifyClassNameAndDescByClassId: ApiResponse<string>
  transferClassToMember: ApiResponse<string>
  deleteMemberFromClass: ApiResponse<string>
  lockClassByClassId: ApiResponse<string>
}
